from django.db import models


class Courseinfo(models.Model):
    course_id = models.IntegerField(primary_key=True)
    course_name = models.CharField(max_length=45)
    course_number = models.CharField(max_length=45, blank=True, null=True)
    course_type = models.CharField(max_length=20, blank=True, null=True)
    course_volume = models.IntegerField(blank=True, null=True)
    credit = models.IntegerField(blank=True, null=True)
    period = models.IntegerField(blank=True, null=True)
    college = models.IntegerField(blank=True, null=True)
    teacher_id = models.IntegerField()
    class_id = models.IntegerField()
    notice = models.TextField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'courseinfo'


class Classroombasicinfo(models.Model):
    building_id = models.IntegerField()
    cid = models.IntegerField()
    classroom_name = models.IntegerField()
    capacity = models.IntegerField()
    notice = models.CharField(max_length=45, blank=True, null=True)
    attribute = models.CharField(max_length=45)

    class Meta:
        managed = False
        db_table = 'classroombasicinfo'


class Building(models.Model):
    building_id = models.IntegerField(primary_key=True)
    building_name = models.CharField(max_length=255)

    class Meta:
        managed = False
        db_table = 'building'


class Coursetime(models.Model):
    course_id = models.IntegerField()
    building_id = models.IntegerField()
    cid = models.IntegerField()
    first_week = models.IntegerField()
    last_week = models.IntegerField()
    day = models.IntegerField()
    time = models.IntegerField()

    class Meta:
        managed = False
        db_table = 'coursetime'

class ClassroomuseinfoIf(models.Model):
    use_id = models.IntegerField(primary_key=True)
    building_id = models.IntegerField()
    cid = models.IntegerField()
    week = models.IntegerField()
    day = models.IntegerField()
    time = models.IntegerField()
    state = models.IntegerField()
    remark = models.CharField(max_length=255, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'classroomuseinfo_if'


class ClassroomuseinfoJidian(models.Model):
    use_id = models.IntegerField(primary_key=True)
    building_id = models.IntegerField()
    cid = models.IntegerField()
    week = models.IntegerField()
    day = models.IntegerField()
    time = models.IntegerField()
    state = models.IntegerField()
    remark = models.CharField(max_length=255, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'classroomuseinfo_jidian'


class ClassroomuseinfoJingguan(models.Model):
    use_id = models.IntegerField(primary_key=True)
    building_id = models.IntegerField()
    cid = models.IntegerField()
    week = models.IntegerField()
    day = models.IntegerField()
    time = models.IntegerField()
    state = models.IntegerField()
    remark = models.CharField(max_length=255, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'classroomuseinfo_jingguan'


class ClassroomuseinfoWaiyu(models.Model):
    use_id = models.IntegerField(primary_key=True)
    building_id = models.IntegerField()
    cid = models.IntegerField()
    week = models.IntegerField()
    day = models.IntegerField()
    time = models.IntegerField()
    state = models.IntegerField()
    remark = models.CharField(max_length=255, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'classroomuseinfo_waiyu'
